using System;
using System.Collections.Generic;
using System.Text;

namespace PickGold.Data
{
    public class CDataPaging
    {
        protected int _PageSize = 0;
        protected int _ItemCount = 0;
        protected int _PageIndex = 0;
        //
        public int PageSize
        {
            set
            {
                this._PageSize = value;
            }
            get
            {
                return this._PageSize;
            }
        }
        //
        public int ItemCount
        {
            set
            {
                this._ItemCount = value;
            }
            get
            {
                return this._ItemCount;
            }
        }
        //
        public int PageIndex
        {
            set
            {
                this._PageIndex = value;
            }
            get
            {
                return this._PageIndex;
            }
        }
        //
        public int PageCount
        {
            get
            {
                if (this._ItemCount % this._PageSize == 0)
                    return this._ItemCount / this._PageSize;
                return this._ItemCount / this._PageSize + 1;
            }
        }
        //
    }
    //
}
//
